package com.dexgdx.game.util.pathcalc;

import com.dexgdx.game.structure.base.BaseObject;
import com.dexgdx.game.structure.base.BaseRegion;

public class DirectPathCalcSession extends AbstractPathFindCalcSession {
	
	@Override
	protected void initializeCalculation() {
		trajCalc.calculate(movingObject);
		targetPreviousRegion.setFromRegion(movingObject.getMoveTarget());
		
	}
	@Override
	protected BaseRegion getNextCalculatedPosition() {
		calculatedNextRegion.x += trajCalc.getTrajectory().x;
		calculatedNextRegion.y += trajCalc.getTrajectory().y;
		return calculatedNextRegion;
	}

	@Override
	public boolean isCalculationFinished() {
		return reachedTarget;
	}
	
	@Override
	protected void finalizeCalculation() {
		// TODO Auto-generated method stub
		
	}
}
